/** 
 * All Rights Reserved , Copyright (C) 2023 , 青岛鼎信通讯股份有限公司
 * 
 * AppMessagePushActionAuto
 * APP推送消息
 * 
 * 修改纪录
 * 2023-09-09 版本：1.0 yanshunkuan 创建。
 * @version 版本：1.0
 * @author 作者：yanshunkuan
 * 创建日期：2023-09-09
 */

package com.topscomm.appv2.controller.auto;

import com.topscomm.appv2.Appv2Controller;
import com.topscomm.appv2.pojo.AppMessagePushEntity;
import com.topscomm.appv2.service.IAppMessagePushService;
import com.topscomm.pub.util.SpringUtil;
import com.topscomm.pub.vo.ResponseResult;
import com.topscomm.tap.common.DatacodeCache;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AppMessagePushControllerAuto extends Appv2Controller<AppMessagePushEntity, IAppMessagePushService> {
	/**
	 * 
	 * @description: 
	 * @param paraMap
	 * @return 
	 * @author: yanshunkuan
	 * @date: 2023-09-09
	 * @modify:
	 */
	@Override
	@GetMapping(value = "/dataCodeList")
	public ResponseResult<Object> dataCodeList(@RequestParam(required = false) Map<String, Object> paraMap) {
		DatacodeCache datacodeCache = (DatacodeCache)SpringUtil.getBean("datacodeCache");
		Map<String, Object> codeMap = new HashMap<String, Object>();
		
		List<Map<String, Object>> stateList = datacodeCache.getCodeListMap("CboMessageState", "", "sortcode");
		codeMap.put("stateList", stateList);
		List<Map<String, Object>> appjumpList = datacodeCache.getCodeListMap("AppJump", "", "sortcode");
		codeMap.put("appjumpList", appjumpList);
		List<Map<String, Object>> messagetypeList = datacodeCache.getCodeListMap("MessageType", "", "sortcode");
		codeMap.put("messagetypeList", messagetypeList);
		List<Map<String, Object>> enabledList = datacodeCache.getCodeListMap("CboYesNo", "", "sortcode");
		codeMap.put("enabledList", enabledList);
		super.dataCodeList(paraMap);
		return ResponseResult.ok(codeMap);
	}
}

